]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowManager: Add top edge drag gesture to unmake fullscreen window
authorJan-Michael Brummer <jan.brummer@tabos.org>
Thu, 7 Jun 2018 15:52:18 +0000 (17:52 +0200)
committerJan-Michael Brummer <jan.brummer@tabos.org>
Sat, 28 Jul 2018 10:11:41 +0000 (12:11 +0200)
Fullscreen windows cannot be restored by touch device users unless the
application adds support for it.
As it is unlikely to change all application lets introduce a top edge
drag gesture which unmakes fullscreen windows.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/123

js/ui/windowManager.js

index bab93a03efb36f8e0a6c4a95e867be37797e7cbe..b831071a09455b4a8093d5fd5768e5fec3ed57c2 100644 (file)
@@ -999,6 +999,14 @@ var WindowManager = new Lang.Class({
             Main.keyboard.show(Main.layoutManager.bottomIndex);
         });
         global.stage.add_action(gesture);
+
+        gesture = new EdgeDragAction.EdgeDragAction(St.Side.TOP, mode);
+        gesture.connect('activated',  () => {
+            let currentWindow = global.display.focus_window;
+            if (currentWindow)
+                currentWindow.unmake_fullscreen();
+        });
+        global.stage.add_action(gesture);
     },
 
     _showPadOsd(display, device, settings, imagePath, editionMode, monitorIndex) {